package com.csxy.six.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyException extends RuntimeException {
    private Integer code;
    private String msg; // 注意这里是 msg 字段，不是 message

    // 重写 getMessage() 方法以兼容标准异常处理
    @Override
    public String getMessage() {
        return this.msg;
    }
}